// desktop max width
desktopWidth = 760px
mdDesktopWidth = 860px
lgDesktopWidth = 960px
// content margin site on desktop
marginBorder = 10px
opacityValue = 0.85
// mobile max width
mobileMaxWidth = 480px
mobileOpacityValue = 0.95
codeFontFamily = Consolas, Monaco, Courier New, Lucida Console;
// code line height
codeLineHeight = 22px
body
  background-color: #34495E;
  margin: 0px;
  font-family: Lato, "Microsoft Jhenghei", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  @media (max-width: mdDesktopWidth)
    font-size: 16px;
article
  line-height: 1.5em;
.highlight
  line-height: 1.25em;
a {
  text-decoration: none;
  color: #3A539B;
}

a:hover {
  // background-color: #1E8BC3; 
  // color: #fff;
  text-decoration: underline;
}

#outer-container {
  position: absolute;
  left: 50%;
  width: lgDesktopWidth;
  margin-left: - (lgDesktopWidth / 2);
  @media (max-width: lgDesktopWidth) {
    width: mdDesktopWidth;
    margin-left: - (mdDesktopWidth / 2);
  }
  @media (max-width: mdDesktopWidth) {
    width: desktopWidth;
    margin-left: - (desktopWidth / 2);
  }
  // box-shadow: 0px 0px 5px 5px rgba(0, 0, 0, .55);
  box-shadow: 0 0 2.5em #5d656c;
}

#menu-outer, #container
  background-color: #fff;

#menu-outer, #bottom-outer, #random-index {
  opacity: opacityValue;
}

.random-center {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -200px;
  width: lgDesktopWidth;
  margin-left: - (lgDesktopWidth / 2);
  @media (max-width: lgDesktopWidth) {
    width: mdDesktopWidth;
    margin-left: - (mdDesktopWidth / 2);
  }
  @media (max-width: mdDesktopWidth) {
    width: desktopWidth;
    margin-left: - (desktopWidth / 2);
  }
}

#random-index {
  margin: 20px;
  padding-bottom: 20px;
  text-align: center;
  border-radius: 10px;
  background-color: #9cceb4;
}

#random-index a {
  // text-transform: uppercase;
  padding: 5px;
}

#random-index .title {
  font-size: 28px;
  font-weight: 900;
  font-color: #34495e;
  // text-shadow: 0 2px rgb(127, 140, 141);
  padding-bottom: 5px;
  cursor: pointer;
}

#random-index .title a {
  color: #34495e;
}

#random-index .title a:hover {
  color: #34495e;
  text-decoration: none;
  background-color: transparent;
}

.sub-title {
  cursor: pointer;
  font-weight: none;
  padding-bottom: 10px;
}

#random-index .index-nav-link {
  list-style: none;
  padding: 5px 0px 5px 0px;
}

#random-index .index-nav-link li {
  display: inline;
  padding-left: 5px;
}

#random-index hr {
  width: 75%;
  color: #7f8c8d;
  margin: 0px auto;
}

.center-field {
  margin: 0 auto;
}

.avatar {
  cursor: pointer;
  margin-top: -70px;
  border: 2px solid white;
  border-radius: 50%;
  background-color: #ecf0f1;
  box-shadow: 0 0px 3px 1px rgba(0,0,0,0.3);
}

// menu start
#menu-outer
  margin: 0px;
  padding: 0px;
  position: fixed;
  z-index: 1;
  transition-property: all;
  transition-duration: .5s;
  transition-timing-function: cubic-bezier(0, 1, 0.5, 1);

.slide-up
  top: -50px;

.slide-down
  top: 0;

#menu-inner
  line-height: 50px;
  height: 49px;
  border-bottom: 1px solid #ddd;
  // height: 20px;
  padding: 0px marginBorder 0 marginBorder;
  width: lgDesktopWidth - marginBorder * 2;
  @media (max-width: lgDesktopWidth)
    width: mdDesktopWidth - marginBorder * 2;
  @media (max-width: mdDesktopWidth)
    width: desktopWidth - marginBorder * 2;
    
#menu-inner .left
  float: left;

#menu-inner #brand
  // margin: 0px;
  float: left;
  // display: inline-block;
  vertical-align: middle;
  cursor: pointer;

#menu-inner #homelink
  line-height: 32px;
  display: inline-block;

#menu-inner #brand a
  top: 0;
  color: #000;

#menu-inner #brand a:hover
  background-color: #fff;
  text-decoration: none;

#menu-list
  line-style: none;
  display: inline-block;
  float: right;
  padding-left: 0px;

#menu-list ul
  margin: 0px;

#menu-list ul li
  padding: 5px;
  margin: 5px;
  text-align: center;
  display: inline;

#menu-list ul li.active
  font-weight: 900;
#menu-list ul li.active a
  color: #000;
  
#menu-list ul li:hover
  font-weight: 900;

#menu-list ul li a
  text-decoration: none;

#menu-outer #avatar
  border-radius: 50%;
  border: 2px wihte solid;
  box-shadow: 0 0px 3px 1px rgba(0,0,0,0.3);
  vertical-align: middle;
  width: 32px;
  height: 32px;
  
// menu end

// bottom start
#bottom-outer
  color: #888;
  text-align: center;
  padding: marginBorder;
  padding-top: 40px;
  background-color: #fff;
  font-size: 14px;
  @media (max-width: lgDesktopWidth)
    font-size: 12px;
// bottom end

// content start
#container
  margin-top: 50px;

#content-outer
  padding: marginBorder;

// content end

.tag-cloud-tags
  text-align: center;

.tag-cloud-tags a
  // background-color: #e8e8e8;
  padding: 3px;

.tag-cloud-tags a:hover
  text-decoration: none;
  background-color: #bbb;
  color: #000;

.center-title
  text-align: center;
  
.category-list
  text-align: center;
  padding-left: 0px;

ul.category-list
  list-style: none;

ul.category-list li
  display: inline-block;
  margin: 10px;

ul.category-list li a
  padding: 8px;
  margin: 8px;
  background-color: #EEE;
  color: #000;

ul.category-list li a:hover
  background-color: #DDD;
  text-decoration: none;

// archive start
.archive-year-title
  margin: 10px 0 5px 0;

.posts-count
  font-size: 12px;
  font-weight: normal;
  color: #888;
  font-style: italic;

.post-title-item
  margin-left: 20px;
  padding-left: 5px;
  border-left: 2px #BBB solid;

.post-title-item:hover
  border-left: 4px #1E8BC3 solid;
// archive end8

.post-title-item p
  margin-top: 2px;
  
#pagination
  margin-top: 20px;
  text-align: center;

#pagination a
  padding: 5px;
  background-color: #EEE;
  line-height: 28px;

#pagination a:hover
  background-color: #DDD;
  color: #1F3A93;
  text-decoration: none;

// hide all button
#btn-view 
  color: #C8F7C5;
  text-align: center;
  background-color: #1E824C;
  border-radius: 50%;
  line-height: 40px;
  display: block;
  position: fixed;
  top: 90%;
  margin-left: 20px;
  height: 40px;
  width: 40px;
  cursor: pointer;
  opacity: 0.25;

#btn-view:hover
  opacity: 0.75;
  box-shadow: 0 0px 10px 5px rgba(46, 204, 113, 0.9);

.page-title-sub
  color: #888;
  font-size: 14px;
  @media (max-width: lgDesktopWidth)
    font-size: 12px;

.page-title-sub span
  margin-right: 5px;

article img
  max-width: lgDesktopWidth - marginBorder * 2;
  @media (max-width: lgDesktopWidth)
    max-width: mdDesktopWidth - marginBorder * 2;
  @media (max-width: mdDesktopWidth)
    max-width: desktopWidth - marginBorder * 2;
    
#user-card
  text-align: center;
  color: #bfa3a3;
  display: none;
  // width: 400px;

#user-card .avatar
  width: 96px;
  height: 96px;
  margin-top: 0px;
  // margin-top: -110px;

#user-card ul
  list-style: none;
  padding: 0px;

#user-card ul li
  display: inline;
  margin: 0px;
  padding: 0px 3px;

#show-menu
  display: none;
  // position: static;
  // text-align: right;
  float: right;
  // margin-right: 10px;

#show-menu button
  background-color: #EEE;
  border: 1px #bc9c9c solid;
  padding: 6px;
  position: static;
  right: 0;
  left: auto;

.category-list-item .active
  background-color: #4183D7;
  color: #fff;
.category-list-item .active:hover
  background-color: #22A7F0;
  
.social-icon
  padding-left: 0px;
      
.social-icon li
  display: inline;

.social-icon li a
  color: gray;

.social-icon li a i
  font-size: 25px;

.social-icon li a:hover
  text-decoration: none;

.douban:hover
  color: #072;
.twitter:hover
  color: #1da1f2;
.linkedin:hover
  color: #bfa3a3;
.weibo:hover
  color: #fa7d3c;
.google-plus:hover
  color: #d73d32;
.facebook:hover
  color: #0e385f;
.dribbble:hover
  color: #ea4c89;
.github:hover
  color: #4078c0;
.coding:hover
  color: #000;
.npmjs:hover
  color: #cb3837;
.youtube:hover
  color: #cc181e;
.zhihu:hover
  color: #0e78e7;
.lofter:hover
  color: #444;
.quora:hover
  color: #b92b27;
.rss:hover
  color: #D35400;
.jian:hover
  color: #de533a;
.instagram:hover
  color: #fd1d1d;
.stackoverflow:hover
  color: #f48024;
.segmentfault:hover
  color: #005f3c;
.side-navigate
  position: fixed;
  top: 60%;
  width: 100%;
  z-index: 2;
  pointer-events: none;

.side-navigate .item
  display: table-cell;

.side-navigate .item-icon:hover
  // border: 5px #52B3D9 solid;
  opacity: 1;
  background-size: 40px 40px;
  
.side-navigate .item-icon
  pointer-events: auto;
  opacity: 0.55;
  padding: 20px;
  border-radius: 50%;
  border: 1px #52B3D9 solid;
  width: 30px;
  height: 30px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 30px 30px;

// .side-navigate .item-icon:hover
  // display: none;
.side-navigate a:hover + div
  display: block;
.side-navigate a:hover
  display: block;

.side-navigate .prev .item-icon
  background-image: url('prev.png');
  float: left;
.side-navigate .prev
  display: inline-block;
  left: 0;

.side-navigate .item-title
  display: none;
  padding: 10px;
  max-width: 300px;
  vertical-align: center;
  background-color: #52B3D9;
  height: 52px;
  
.side-navigate .next .item-icon
  background-image: url('next.png')
  float: right;
.side-navigate .prev .item-title
  margin-left: 70px;
.side-navigate .next .item-title
  margin-right: 70px;

.side-navigate .next
  // text-align: right;
  display: inline-block;
  float: right;
  right: 0;

.fancybox-thumb:hover
  text-decoration: none;
.fancybox-thumb img
  max-width: 120px;
  max-height: 120px;
  padding: 3px;
  border-radius: 5%;
  border: 1px solid #DDD;

.caption
  display: block;
  text-align: center;
  font-size: 14px;
  color: #999;

.random-toc-area
  position: fixed;
  width: 200px;
  right: 0px;
  top: 0px;
  display: block;
  @media (max-width: lgDesktopWidth + 400px)
    display: none;
    
.random-toc
  // top: 30px;
  background: #444;
  color: #bbb;
  height: 500px;
  margin-top: 0px;
  font-size: 12px;
  height: 100%;
  overflow-y: auto;
.random-toc ol
  padding-left: 15px;
.random-toc h2
  text-align: center;
.random-toc a
  color: #bbb;
  display: block;
// .random-toc li:hover
.toc-text
  display: block;
.toc-text:hover
  background-color: #666;
.btn-hide-toc
  // top: 0px;
  border: none;
  z-index: 1;
  display: block;
  width: 100%;
  background-color: #666;
  height: 30px;
  color: #bbb;
.btn-hide-toc:hover
  background-color: #888;
  
// code style
figure.highlight
  margin: 0px -10px 0px -10px;

  td.gutter
    padding-right: 20px;

  .line
    height: codeLineHeight;

code
  font-family: codeFontFamily;
  background-color: #ddd;
  font-style: italic;
  padding-left: 12px;
  padding-right: 12px;

table .line
  font-family: codeFontFamily;
  height: codeLineHeight;

blockquote
  background-color: #EEE;
  padding: 2px 10px;
  border-left: 2px solid #999;

// side-navigate, hide while max-width < desktopWidth + 300px
@media (max-width: desktopWidth + 300px)
  .side-navigate
    display: none;
  .jiathis_style
    display: none;
    visibility: hidden;

// mobile
@media (max-width: desktopWidth)
  #outer-container,.random-center,#menu-outer
    width: 100%;
  #outer-container
    left: 0%;
    margin-left: 0px;
  #menu-inner
    width: 95%;
    padding: 0 2%;
  .post-title-item
    margin-left: 3px;
  #show-menu
    display: inline-block;
  article img
    width: 95%
  #menu-list
    display: none;
    position: absolute;
    margin-top: 50px;
    background-color: #FFF;
    opacity: opacityValue;
    width: 100%;
  #menu-list ul
    padding-left: 0px;
  #menu-list ul li
    text-align: center;
    display: block;
  .highlight
    margin-left: 0px;
    margin-right: 0px;
  // #user-card
    // width: 200px;
@media (max-width: mobileMaxWidth)
  .random-center
    position: static;
    left: 0;
    margin-left: 0px;
    width: 100%;
    margin-top: 30%;
  #random-index .index-nav-link li
    display: block;
    // padding: 0px 0px;
  #bottom-outer, #random-index
    opacity: mobileOpacityValue;
  #menu-outer
    opacity: mobileOpacityValue;
  
@media (max-height: 480px)
  .random-center
    position: static;
    top: 0;
    left: 0;
    margin-left: 0px;
    margin-top: 95px;
    width: 100%;
  #random-index .index-nav-link li
    display: block;
    padding: 0px 0px;

@media (max-height: 320px)
  .random-center
    margin-top: 75px;
